﻿<Page x:Class="Perspective.Config.View.SkinConfig"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:p="http://www.codeplex.com/perspective"
    Style="{StaticResource PageStyle}"
    FontSize="14"
	Title="LocalizationDemo">
    <Viewbox>
        <ListView
            Margin="5"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            ItemsSource="{Binding Skins}">
            <ListView.Template>
                <ControlTemplate 
                    TargetType="ItemsControl">
                    <Border 
                        BorderBrush="Black" 
                        BorderThickness="2" 
                        CornerRadius="5"
                        Padding="5">
                        <ItemsPresenter />
                    </Border>
                </ControlTemplate>
            </ListView.Template>
            <ListView.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel 
                        Style="{DynamicResource ColoredPanelStyle}"/>
                </ItemsPanelTemplate>
            </ListView.ItemsPanel>
            <ListView.ItemTemplate>
                <DataTemplate>
                    <RadioButton 
                        GroupName="SkinInfo"
                        Content="{Binding}"
                        Command="{Binding 
                            RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}, 
                            Path=DataContext.SetCurrentSkinCommand}"
                        CommandParameter="{Binding}">
                        <RadioButton.IsChecked>
                            <p:SignalBinding 
                                x:Name="radioButtonIsCheckedBinding"
                                Mode="OneWay"
                                Converting="radioButtonIsCheckedBinding_Converting"/>
                        </RadioButton.IsChecked>
                    </RadioButton>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>        
    </Viewbox>
</Page>
